package org.kele.k8s.sc2020.provider.service.impl;

import com.alicp.jetcache.anno.Cached;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.kele.k8s.sc2020.provider.entity.Employee;
import org.kele.k8s.sc2020.provider.mapper.EmployeeMapper;
import org.kele.k8s.sc2020.provider.service.IEmployeeService;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * <p>
 * 员工表 服务实现类
 * </p>
 *
 * @author xukele
 * @since 2021-10-23
 */
@Slf4j
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements IEmployeeService {

    @Cached(name = "kele_emp_", key = "#id", expire = 1000)
    @Override
    public Employee getById(Serializable id) {
        return IEmployeeService.super.getById(id);
    }
}
